import Vue from 'vue'
import Router from 'vue-router'

// import Login from '@/pages/login'//登录
// /**
//  * 系统首页
//  */
// import Home from '@/pages/home'//首页
// import changeThePassword from "@/pages/theSystemFrontPage/systemPage/changeThePassword"//修改密码
// import systemPage from "@/pages/theSystemFrontPage/systemPage/systemPage"//系统首页
// /**
//  * 仓储模块
//  */
// import Storage from '@/pages/storage/storage'//仓储组件
// import storageSetting from '@/pages/storage/storageSetting'//仓库设置
// import shelfManagement from '@/pages/storage/shelfManagement'//货架管理
// import detailedAccount from '@/pages/storage/detailedAccount'//库存清单
// import storageAllot from '@/pages/storage/storageAllot'//仓库调拨
// import inventory from '@/pages/storage/inventory'//仓库盘点
// import WarehouseManagement from '@/pages/storage/WarehouseManagement'//出库管理
// import stockManagement from '@/pages/storage/stockManagement'//入库管理
//
// /**
//  * 商品模块
//  */
// import Product from '@/pages/product/product' //商品组件
// import productList from '@/pages/product/CommodityManagement/productList'  //商品列表
// import singleSKU from '@/pages/product/CommodityManagement/singleSKU'  //添加SKU
// import combinationSKU from '@/pages/product/CommodityManagement/combinationSKU'  //添加组合SKU
// import AddTheGoods from '@/pages/product/CommodityManagement/AddTheGoods'//添加商品
// import addNextProduct from '@/pages/product/CommodityManagement/addNextProduct'//添加商品详情
//
// import ClassificationList from '@/pages/product/ProductConfiguration/ClassificationList'  //商品分类
// import addCommodityClassification from '@/pages/product/ProductConfiguration/addCommodityClassification'
//
// import CommodityAttribute from '@/pages/product/ProductConfiguration/CommodityAttribute'//商品属性
// import AddAttributes from '@/pages/product/ProductConfiguration/AddAttributes'//添加商品属性
//
// import BrandManagement from '@/pages/product/ProductConfiguration/BrandManagement'//品牌管理
//
//
// /**
//  * 刊登
//  */
// import Publish from '@/pages/publish/Publish';//刊登组件
// import PublishProductList from '@/pages/publish/ProductLibrary/PublishProductList';//刊登产品列表
// import Draft from '@/pages/publish/EBayPublished/Draft';//eBay商品
// import AddDraft from '@/pages/publish/EBayPublished/AddDraft'//添加草稿
//
// /**
//  * 订单
//  */
// import order from '@/pages/order/order'//订单组件
// import OrderList from '@/pages/order/OrderList'//订单列表
// import orderDetail from '@/pages/order/orderDetail'//订单详情
//
// /**
//  * 物流
//  */
// import logistics from '@/pages/logistics/logistics'//物流组件
// import LogisticsBusinessAuthorization from '@/pages/logistics/LogisticsIsSet/LogisticsBusinessAuthorization'//物流商授权
// import TheFreightTemplate from '@/pages/logistics/TheFreightIsSet/TheFreightTemplate'//运费模板
// import AddFreighTempate from '@/pages/logistics/TheFreightIsSet/AddFreighTempate'//添加运费模板
//
// /**
//  * 设置
//  */
// import setUpThe from '@/pages/setUpThe/setUpThe'//设置组件
// import theStoreList from '@/pages/setUpThe/generalChannelManagement/theStoreList'//无授权店铺列表
// import listOfAuthorizedStores from '@/pages/setUpThe/generalChannelManagement/listOfAuthorizedStores'//已授权店铺列表
// import roleManagement from '@/pages/setUpThe/rightsManagement/roleManagement'//角色管理
// import userManagement from '@/pages/setUpThe/rightsManagement/userManagement'//用户管理
//
// /**
//  * 财务
//  */
// import financial from '@/pages/financial/financial'//财务组件
// import payPalAccountManagement from '@/pages/financial/payPalAccountManagement'//paypal帐号管理
// import inTheManagement from  '@/pages/financial/inTheManagement'
// Vue.use(Router)
//
// let router =  new Router({
//   linkActiveClass: 'active',
//   routes: [
//     {
//       path: '/home',
//       name: '首页',
//       meta:{
//          name:"首页"
//       },
//       component: (revoke) => require(['@/pages/home'],revoke),
//       children:[
//         {
//           path:'/home/changeThePassword',
//           name:'修改密码',
//           meta:{
//             name:"修改密码"
//           },
//           component:(revoke) => require(['@/pages/theSystemFrontPage/systemPage/changeThePassword'],revoke)
//         },
//         {
//           path:'/home',
//           name:'系统首页',
//           component:(revoke) => require(['@/pages/theSystemFrontPage/systemPage/systemPage'],revoke),
//         }
//       ]
//     },
//     {
//       path:'/storage',
//       name:'仓储',
//       component:(revoke) => require(['@/pages/storage/storage'],revoke),
//       children:[
//         {
//           path:'/storage',
//           name:'仓库设置',
//           component:(revoke) => require(['@/pages/storage/storageSetting'],revoke)
//         },
//         {
//           path:'/storage/storageSetting',
//           name:'仓库设置',
//           component:(revoke) => require(['@/pages/storage/storageSetting'],revoke)
//         },
//         {
//           path:'/storage/shelfManagement',
//           name:'货架管理',
//           component:(revoke) => require(['@/pages/storage/shelfManagement'],revoke)
//         },
//         {
//           path:'/storage/detailedAccount',
//           name:'库存清单',
//           component:(revoke) => require(['@/pages/storage/detailedAccount'],revoke)
//         },
//
//         {
//           path:'/storage/storageAllot',
//           name:'仓库调拨',
//           component:(revoke) => require(['@/pages/storage/storageAllot'],revoke)
//         },{
//           path:'/storage/inventory',
//           name:'仓库盘点',
//           component:(revoke) => require(['@/pages/storage/inventory'],revoke)
//         },{
//           path:'/storage/WarehouseManagement',
//           name:'出库管理',
//           component:(revoke) => require(['@/pages/storage/WarehouseManagement'],revoke)
//         },{
//           path:'/storage/stockManagement',
//           name:'入库管理',
//           component:(revoke) => require(['@/pages/storage/WarehouseManagement'],revoke)
//         }
//       ]
//     },
//     {
//       path:'/product',
//       name:'商品',
//       component:(revoke) => require(['@/pages/product/product'],revoke),
//       children:[
//         {
//           path:'/product',
//           name:'商品列表',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/productList'],revoke)
//         },
//         {
//           path:'/product/productList',
//           name:'商品列表',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/productList'],revoke)
//         },
//         {
//           path:'/product/singleSKU',
//           name:'添加单个SKU',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/singleSKU'],revoke)
//         },
//         {
//           path:'/product/combinationSKU',
//           name:'添加组合SKU',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/combinationSKU'],revoke)
//         },{
//           path:'/product/ClassificationList',
//           name:'商品分类',
//           component:(revoke) => require(['@/pages/product/ProductConfiguration/ClassificationList'],revoke)
//         },{
//           path:'/product/AddTheGoods',
//           name:'添加商品',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/AddTheGoods'],revoke)
//         },
//         {
//           path:'/product/addCommodityClassification',
//           name:'添加商品分类',
//           component:(revoke) => require(['@/pages/product/ProductConfiguration/addCommodityClassification'],revoke)
//         },
//         {
//           path:'/product/addNextProduct',
//           name:'添加商品详情',
//           component:(revoke) => require(['@/pages/product/CommodityManagement/addNextProduct'],revoke)
//         },{
//           path:'/product/BrandManagement',
//           name:'品牌管理',
//           component:(revoke) => require(['@/pages/product/ProductConfiguration/BrandManagement'],revoke)
//         },
//         {
//           path:'/product/CommodityAttribute',
//           name:'商品属性',
//           component:(revoke) => require(['@/pages/product/ProductConfiguration/CommodityAttribute'],revoke)
//         },
//         {
//           path:'/product/AddAttributes',
//           name:'添加商品属性',
//           component:(revoke) => require(['@/pages/product/ProductConfiguration/AddAttributes'],revoke)
//         }
//       ]
//     },
//     {
//       path:'/publish',
//       name:'刊登',
//       component:(revoke) => require(['@/pages/publish/Publish'],revoke),
//       children:[
//         {
//           path:'/publish',
//           name:'产品列表',
//           component:(revoke) => require(['@/pages/publish/ProductLibrary/PublishProductList'],revoke)
//         },
//         {
//           path:'/publish/PublishProductList',
//           name:'产品列表',
//           component:(revoke) => require(['@/pages/publish/ProductLibrary/PublishProductList'],revoke)
//         },
//         {
//           path:'/publish/Draft',
//           name:'eBay商品',
//           component:(revoke) => require(['@/pages/publish/EBayPublished/Draft'],revoke)
//         },
//         {
//           path:'/publish/AddDraft',
//           name:'添加草稿',
//           component:(revoke) => require(['@/pages/publish/EBayPublished/AddDraft'],revoke)
//         }
//       ]
//     },
//     {
//       path:'/order',
//       name:'订单',
//       component:(revoke) => require(['@/pages/order/order'],revoke),
//       children:[
//         {
//           path:'/order',
//           name:'订单列表',
//           component:(revoke) => require(['@/pages/order/OrderList'],revoke)
//         },
//         {
//           path:'/order/OrderList',
//           name:'订单列表',
//           component:(revoke) => require(['@/pages/order/OrderList'],revoke)
//         },
//         {
//           path:'/order/orderDetail',
//           name:'订单详情',
//           component:(revoke) => require(['@/pages/order/orderDetail'],revoke)
//         }
//
//       ]
//     },
//     {
//       path:'/logistics',
//       name:'物流',
//       component:(revoke) => require(['@/pages/logistics/logistics'],revoke),
//       children:[
//         {
//           path:'/logistics',
//           name:'物流商授权',
//           component:(revoke) => require(['@/pages/logistics/LogisticsIsSet/LogisticsBusinessAuthorization'],revoke)
//         },
//         {
//           path:'/logistics/LogisticsBusinessAuthorization',
//           name:'物流商授权',
//           component:(revoke) => require(['@/pages/logistics/LogisticsIsSet/LogisticsBusinessAuthorization'],revoke)
//         },
//         {
//           path:'/logistics/TheFreightTemplate',
//           name:'运费模板',
//           component:(revoke) => require(['@/pages/logistics/TheFreightIsSet/TheFreightTemplate'],revoke)
//         },
//         {
//           path:'/logistics/AddFreighTempate',
//           name:'添加运费模板',
//           component:(revoke) => require(['@/pages/logistics/TheFreightIsSet/AddFreighTempate'],revoke)
//         }
//       ]
//     },
//     {
//       path:'/setUpThe',
//       name:'设置',
//       component:(revoke) => require(['@/pages/setUpThe/setUpThe'],revoke),
//       children:[
//         {
//           path:'/setUpThe',
//           name:'店铺列表',
//           component:(revoke) => require(['@/pages/setUpThe/generalChannelManagement/listOfAuthorizedStores'],revoke)
//         },
//         {
//           path:'/setUpThe/listOfAuthorizedStores',
//           name:'已授权商品列表',
//           component:(revoke) => require(['@/pages/setUpThe/generalChannelManagement/listOfAuthorizedStores'],revoke)
//         },
//         {
//           path:'/setUpThe/roleManagement',
//           name:'角色管理',
//           component:(revoke) => require(['@/pages/setUpThe/rightsManagement/roleManagement'],revoke)
//         },
//         {
//           path:'/setUpThe/userManagement',
//           name:'用户管理',
//           component:(revoke) => require(['@/pages/setUpThe/rightsManagement/userManagement'],revoke)
//         }
//       ]
//     },
//     {
//       path:'/financial',
//       name:'财务',
//       component:(revoke) => require(['@/pages/financial/financial'],revoke),
//       children:[
//         {
//           path:'/financial',
//           name:'PayPal账号管理',
//           component:(revoke) => require(['@/pages/financial/payPalAccountManagement'],revoke)
//         },
//         {
//           path:'/financial/inTheManagement',
//           name:'收汇管理',
//           component:(revoke) => require(['@/pages/financial/inTheManagement'],revoke)
//         }
//       ]
//     }
//   ]
// })
export default [
  {
    path: '/',
    name: '首页',
    meta:{
      name:"首页"
    },
    component: (revoke) => require(['@/pages/home'],revoke),
    children:[
      {
        path:'/changeThePassword',
        name:'修改密码',
        meta:{
          name:"修改密码"
        },
        component:(revoke) => require(['@/pages/theSystemFrontPage/systemPage/changeThePassword'],revoke)
      },
      {
        path:'/home',
        name:'系统首页',
        component:(revoke) => require(['@/pages/theSystemFrontPage/systemPage/systemPage'],revoke),
      }
    ]
  },
  {
    path:'/storage',
    name:'仓储',
    component:(revoke) => require(['@/pages/storage/storage'],revoke),
    children:[
      {
        path:'/storage',
        name:'仓库设置',
        component:(revoke) => require(['@/pages/storage/storageSetting'],revoke)
      },
      {
        path:'/storage/storageSetting',
        name:'仓库设置',
        component:(revoke) => require(['@/pages/storage/storageSetting'],revoke)
      },
      {
        path:'/storage/shelfManagement',
        name:'货架管理',
        component:(revoke) => require(['@/pages/storage/shelfManagement'],revoke)
      },
      {
        path:'/storage/detailedAccount',
        name:'库存清单',
        component:(revoke) => require(['@/pages/storage/detailedAccount'],revoke)
      },

      {
        path:'/storage/storageAllot',
        name:'仓库调拨',
        component:(revoke) => require(['@/pages/storage/storageAllot'],revoke)
      },{
        path:'/storage/inventory',
        name:'仓库盘点',
        component:(revoke) => require(['@/pages/storage/inventory'],revoke)
      },{
        path:'/storage/WarehouseManagement',
        name:'出库管理',
        component:(revoke) => require(['@/pages/storage/WarehouseManagement'],revoke)
      },{
        path:'/storage/stockManagement',
        name:'入库管理',
        component:(revoke) => require(['@/pages/storage/WarehouseManagement'],revoke)
      }
    ]
  },
  {
    path:'/product',
    name:'商品',
    component:(revoke) => require(['@/pages/product/product'],revoke),
    children:[
      {
        path:'/product',
        name:'商品列表',
        component:(revoke) => require(['@/pages/product/CommodityManagement/productList'],revoke)
      },
      {
        path:'/product/productList',
        name:'商品列表',
        component:(revoke) => require(['@/pages/product/CommodityManagement/productList'],revoke)
      },
      {
        path:'/product/singleSKU',
        name:'添加单个SKU',
        component:(revoke) => require(['@/pages/product/CommodityManagement/singleSKU'],revoke)
      },
      {
        path:'/product/combinationSKU',
        name:'添加组合SKU',
        component:(revoke) => require(['@/pages/product/CommodityManagement/combinationSKU'],revoke)
      },{
        path:'/product/ClassificationList',
        name:'商品分类',
        component:(revoke) => require(['@/pages/product/ProductConfiguration/ClassificationList'],revoke)
      },{
        path:'/product/AddTheGoods',
        name:'添加商品',
        component:(revoke) => require(['@/pages/product/CommodityManagement/AddTheGoods'],revoke)
      },
      {
        path:'/product/addCommodityClassification',
        name:'添加商品分类',
        component:(revoke) => require(['@/pages/product/ProductConfiguration/addCommodityClassification'],revoke)
      },
      {
        path:'/product/addNextProduct',
        name:'添加商品详情',
        component:(revoke) => require(['@/pages/product/CommodityManagement/addNextProduct'],revoke)
      },{
        path:'/product/BrandManagement',
        name:'品牌管理',
        component:(revoke) => require(['@/pages/product/ProductConfiguration/BrandManagement'],revoke)
      },
      {
        path:'/product/CommodityAttribute',
        name:'商品属性',
        component:(revoke) => require(['@/pages/product/ProductConfiguration/CommodityAttribute'],revoke)
      },
      {
        path:'/product/AddAttributes',
        name:'添加商品属性',
        component:(revoke) => require(['@/pages/product/ProductConfiguration/AddAttributes'],revoke)
      }
    ]
  },
  {
    path:'/publish',
    name:'刊登',
    component:(revoke) => require(['@/pages/publish/Publish'],revoke),
    children:[
      {
        path:'/publish',
        name:'产品列表',
        component:(revoke) => require(['@/pages/publish/ProductLibrary/PublishProductList'],revoke)
      },
      {
        path:'/publish/PublishProductList',
        name:'产品列表',
        component:(revoke) => require(['@/pages/publish/ProductLibrary/PublishProductList'],revoke)
      },
      {
        path:'/publish/Draft',
        name:'eBay商品',
        component:(revoke) => require(['@/pages/publish/EBayPublished/Draft'],revoke)
      },
      {
        path:'/publish/AddDraft',
        name:'添加草稿',
        component:(revoke) => require(['@/pages/publish/EBayPublished/AddDraft'],revoke)
      }
    ]
  },
  {
    path:'/order',
    name:'订单',
    component:(revoke) => require(['@/pages/order/order'],revoke),
    children:[
      {
        path:'/order',
        name:'订单列表',
        component:(revoke) => require(['@/pages/order/OrderList'],revoke)
      },
      {
        path:'/order/OrderList',
        name:'订单列表',
        component:(revoke) => require(['@/pages/order/OrderList'],revoke)
      },
      {
        path:'/order/orderDetail',
        name:'订单详情',
        component:(revoke) => require(['@/pages/order/orderDetail'],revoke)
      }

    ]
  },
  {
    path:'/logistics',
    name:'物流',
    component:(revoke) => require(['@/pages/logistics/logistics'],revoke),
    children:[
      {
        path:'/logistics',
        name:'物流商授权',
        component:(revoke) => require(['@/pages/logistics/LogisticsIsSet/LogisticsBusinessAuthorization'],revoke)
      },
      {
        path:'/logistics/LogisticsBusinessAuthorization',
        name:'物流商授权',
        component:(revoke) => require(['@/pages/logistics/LogisticsIsSet/LogisticsBusinessAuthorization'],revoke)
      },
      {
        path:'/logistics/TheFreightTemplate',
        name:'运费模板',
        component:(revoke) => require(['@/pages/logistics/TheFreightIsSet/TheFreightTemplate'],revoke)
      },
      {
        path:'/logistics/AddFreighTempate',
        name:'添加运费模板',
        component:(revoke) => require(['@/pages/logistics/TheFreightIsSet/AddFreighTempate'],revoke)
      }
    ]
  },
  {
    path:'/setUpThe',
    name:'设置',
    component:(revoke) => require(['@/pages/setUpThe/setUpThe'],revoke),
    children:[
      {
        path:'/setUpThe',
        name:'店铺列表',
        component:(revoke) => require(['@/pages/setUpThe/generalChannelManagement/listOfAuthorizedStores'],revoke)
      },
      {
        path:'/setUpThe/listOfAuthorizedStores',
        name:'已授权商品列表',
        component:(revoke) => require(['@/pages/setUpThe/generalChannelManagement/listOfAuthorizedStores'],revoke)
      },
      {
        path:'/setUpThe/roleManagement',
        name:'角色管理',
        component:(revoke) => require(['@/pages/setUpThe/rightsManagement/roleManagement'],revoke)
      },
      {
        path:'/setUpThe/userManagement',
        name:'用户管理',
        component:(revoke) => require(['@/pages/setUpThe/rightsManagement/userManagement'],revoke)
      }
    ]
  },
  {
    path:'/financial',
    name:'财务',
    component:(revoke) => require(['@/pages/financial/financial'],revoke),
    children:[
      {
        path:'/financial',
        name:'PayPal账号管理',
        component:(revoke) => require(['@/pages/financial/payPalAccountManagement'],revoke)
      },
      {
        path:'/financial/inTheManagement',
        name:'收汇管理',
        component:(revoke) => require(['@/pages/financial/inTheManagement'],revoke)
      }
    ]
  }
]





// export default router;

